package com.t2two.example.testprod;

import org.springframework.util.AntPathMatcher;

import java.util.Calendar;

/**
 * @version 1.0
 * @description: TODO
 * @author: lifei
 * @date: 2025/4/29 14:36
 */
public class DDD {

    public static void main(String[] args) {
        asdfjkl();

        System.out.println(isPathMatch("/v2/api-docs", "/api/v1/fast_mail/system/user/current/user"));
    }

    public static void asdfjkl(){
        Long aLong= 1000L;
        long l = aLong / 500;
        System.out.println(l);
        Calendar calendar = Calendar.getInstance();
        System.out.println("aaaaaaaaaaaaa "+(calendar.getTime()));
        calendar.add(Calendar.DATE,-2);
        System.out.println("bbbbbbbbbbbbb "+(calendar.getTime()));

        String fullName = "根节点/测试公司/研发部1";
        String substring = fullName.substring(fullName.indexOf("/")+1);
        System.out.println("aaaaaaaaaaaa "+substring);

        String code = "asdfjkl*jjj.22";
        String[] split = code.split("\\.");
        System.out.println("aaaaaaaaaaaaaaaadddddddddd "+split[0]);
    }

    private static AntPathMatcher matcher = new AntPathMatcher();

    public static boolean isPathMatch(String pattern, String path) {
        return matcher.match(pattern, path);
    }
}
